{% extends "schedule/base.html" %}
{% block body %}
<div style="width: 800px;">
	<div class="event_actions">
	{% if back_url %}
	<a href="{{ back_url }}"><img border="0" src="/site_media/left_mod.png" /></a> &nbsp;
	{% endif %}
	<a href="{% url s_edit_event event.id %}"><img border="0" src="/site_media/pencil.png" title="edit" /></a> &nbsp;
	<a href="{% url s_delete_event event.id %}"><img border="0" src="/site_media/delete.png" title="delete" /></a>
	</div>
	<h2 align="center">{{event.title}}</h2>
	<table align="center">
		<tr>
			<td>Starts</td>
			<td>{{event.start|time:"f a"}}</td><td>{{event.start|date:"l, F j, Y"}}.</td>
		</tr>
		<tr>
			<td>Ends</td>
			<td>{{event.end|time:"f a"}}</td><td>{{event.end|date:"l, F j, Y"}}.</td>
		</tr>
		<tr>
			<td>Location</td>
			<td>&nbsp;</td><td>{{event.location}}.</td>
		</tr>
		<tr>
			<td>Reoccurs</td>
			{% if event.rule %}
				<td>{{ event.rule }}</td><td>until {{ event.end_recurring_period }}</td>
			{% else %}
				<td>&nbsp;</td>
				<td>This is a "one time only" event.</td>
			{% endif %}
		</tr>
		{% if event.description %}
			<tr>
				<td>Description</td>
				<td>&nbsp;</td>
				<td>{{event.description|urlize|linebreaks}}</td>
			</tr>
		{% endif %}
		
		{% if related_objects %}
			{% for object in related_objects %}
				<tr>
					<td colspan="3" style="text-align: center; " >
						<a href="{{ object.content_object.get_absolute_url }}">Event Details</a>
					</td>
				</tr>		
			{% endfor %}
		{% endif %}
	</table>
	<hr/>
	{% if calendar %}
	<p align="center">
	<a href="{% url d_calendar_date calendar.id event.start.year event.start.month event.start.day %}">Current Day Calendar</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{% url m_calendar_date calendar.id event.start.year event.start.month %}">Current Month Calendar</a>
	</p>
	{% endif %}
</div>
{% endblock %}
